<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">

    <f:view contentType="text/html">
        <h:head>
            <f:facet name="first">
                <meta content='text/html; charset=UTF-8' http-equiv="Content-Type"/>
                <title>PrimeFaces</title>
            </f:facet>
        </h:head> 

        <h:body>
            <ui:composition template="./template.xhtml">
                <ui:define name="top">

                </ui:define>
                <ui:define name="left">
                    <h:form >
                        <p:menu my="true" style="width:200px">
                            <p:submenu label="Navigation Employé" >  
                                <p:menuitem value="Les employés" action="#{redirectionBean.getRedirectionListeAmploye}" icon="ui-icon-home"/>  
                                <p:menuitem value="Reporting" action="#" icon="ui-icon-star"/>  
                            </p:submenu>
                            <p:submenu label="Navigation Mission">  
                                <p:menuitem value="Gestion des missions" action="#{redirectionBean.getRedirectionGestionMission}" icon="ui-icon-suitcase" />   
                            </p:submenu>  
                            <p:submenu label="Navigation Réglage">  
                                <p:menuitem value="Réglage formulaire" action="#{redirectionBean.getRedirectionGeglageformulaire}" icon="ui-icon-gear"/>  
                            </p:submenu>  
                        </p:menu> 
                    </h:form>
                </ui:define>
                <ui:define name="content">

                    <h:form>

                    </h:form>
                    <h:form id="formDetaisTravailleur">
                        <p:panel header="Employé" style="width: 95%">
                            <f:facet name="header">
                                Détails d'un employé
                                <p:commandButton style="float: right;" value="Retour" title="Retour à la liste des employés" 
                                                 action="#{lesTravailleursBean.getPagePrecedente}"
                                                 icon="ui-icon-arrowreturnthick-1-w"/>

                            </f:facet>
                            <p:accordionPanel multiple="true" id="DetailsTravailleur" >  
                                <p:tab title="Informations de personnelles">  
                                    <h:panelGrid columns="2" cellpadding="10">  
                                        
                                        <p:graphicImage value="#{lesTravailleursBean.cvTravailleurSelectionner.afficherImageEnBlob}" width="150" height="150" /> 
                                        
                                        
                                        <h:panelGrid columns="1" cellpadding="10">
                                            <h:panelGrid columns="2">
                                                <p:panelGrid columns="2">
                                                    <p:outputLabel value="Matricule :" for="matricule"/>
                                                    <h:outputText value="#{lesTravailleursBean.cvTravailleurSelectionner.IDpersonne}" id="matricule"/>
                                                    <p:outputLabel value="Nom :" for="nom"/>
                                                    <h:outputText value="#{lesTravailleursBean.cvTravailleurSelectionner.nom}" id="nom"/>
                                                    <p:outputLabel value="Prenom :" for="prenom"/>
                                                    <h:outputText value="#{lesTravailleursBean.cvTravailleurSelectionner.prenom}" id="prenom"/>
                                                    <p:outputLabel value="Date de naissance :" for="naissance"/>
                                                    <h:outputText value="#{lesTravailleursBean.cvTravailleurSelectionner.datenaissance}" id="naissance" >
                                                        <f:convertDateTime pattern="dd/MM/yyyy" />
                                                    </h:outputText>
                                                    <p:outputLabel value="Nationnalités : " for="listeNationnalite" />  
                                                    <p:dataList id="listeNationnalite" value="#{lesTravailleursBean.cvNationalitetravailleurSelectionner}" var="nationalite">  
                                                        <p:graphicImage value="./public/images/drapeau/#{nationalite.cvPays.codePays}.png" width="16" height="11"/> #{nationalite.cvPays.paysfr} <br /> 
                                                    </p:dataList>
                                                </p:panelGrid>
                                                <p:panelGrid columns="1">
                                                    <h:outputLabel value="Adresse complète" for="AdresseComplete"/>
                                                    <p:panelGrid columns="2" id="AdresseComplete">
                                                        <p:outputLabel value="Adresse :" for="adresse"/>
                                                        <h:outputText value="#{lesTravailleursBean.elementAdresse.adresse}" id="adresse"/>
                                                        <p:outputLabel value="Code postale :" for="codePostal"/>
                                                        <h:outputText value="#{lesTravailleursBean.elementAdresse.codePostal}" id="codePostal"/>
                                                        <p:outputLabel value="Pays :" for="pays"/>
                                                        <h:outputText value="#{lesTravailleursBean.elementAdresse.pays}" id="pays"/>
                                                    </p:panelGrid>

                                                </p:panelGrid>
                                            </h:panelGrid>
                                            <h:panelGrid columns="1">
                                                <h:panelGrid columns="2">
                                                    <p:panelGrid columns="2">
                                                        <p:outputLabel value="Poste :" for="poste"/>
                                                        <h:outputText value="#{lesTravailleursBean.cvPosteoccupeSelectionner.cvListeposteIdposte.poste}" id="poste"/>
                                                        <p:outputLabel value="Equipe :" for="equipe"/>
                                                        <h:outputText value="#{lesTravailleursBean.cvAffectationSelectionner.cvEquipedepartementIdequipedepartement.equipe}" id="equipe"/>
                                                        <p:outputLabel value="Département :" for="departement"/>
                                                        <h:outputText value="#{lesTravailleursBean.cvAffectationSelectionner.cvEquipedepartementIdequipedepartement.iddepartement.nomdepartement}" id="departement"/>
                                                        <p:outputLabel value="Mission :" for="mission"/>
                                                        <h:outputText value="#{lesTravailleursBean.cvAffectationSelectionner.cvEquipedepartementIdequipedepartement.iddepartement.idmission.idmission}" id="mission"/>
                                                    </p:panelGrid>
                                                    <p:panelGrid columns="1">
                                                        <p:outputLabel value="Téléphone :" for="listeTelephone"/>
                                                        <p:dataList id="listeTelephone" value="#{lesTravailleursBean.listeCvTelephonetavaleursSelectionner}" var="telephone">  
                                                            <h:outputText styleClass="alert-info" value="#{telephone.numerotelephone}" /> <br /> 
                                                        </p:dataList>
                                                    </p:panelGrid>
                                                </h:panelGrid>

                                            </h:panelGrid>
                                        </h:panelGrid>
                                    </h:panelGrid>  
                                </p:tab>  
                                <p:tab title="Documents personnelles" titleStyle="color: #F00;">  
                                    <h:panelGrid columns="1" cellpadding="10">  
                                        <h:panelGrid columns="2" cellpadding="10">
                                            <p:panel header="Pièce d'identité">
                                                <h:panelGrid columns="2">
                                                    <p:outputLabel value="N°numéro de pièce :" for="pieceidentite"/>
                                                    <h:outputText value="#{lesTravailleursBean.cvDocofficiels.numerocardeidentite}" id="pieceidentite"/>
                                                    <p:outputLabel value="Justificatif de la pièce :" for="justificatifPiece" />
                                                    <h:commandLink value="#" id="justificatifPiece" /> 
                                                </h:panelGrid>
                                            </p:panel>
                                            <p:panel header="Visa">
                                                <h:panelGrid columns="2">
                                                    <p:outputLabel value="N°numéro du visa :" for="visanumber"/>
                                                    <h:outputText value="#{lesTravailleursBean.cvDocofficiels.numerovisa}" id="visanumber"/>
                                                    <p:outputLabel value="Justificatif du visa :" for="justificatifVisa"  />
                                                    <h:commandLink value="#" id="justificatifVisa" /> 
                                                </h:panelGrid>
                                            </p:panel>
                                        </h:panelGrid>
                                        <h:panelGrid columns="2" cellpadding="10">
                                            <p:panel header="Passeports" >
                                                <h:panelGrid columns="2">
                                                    <p:outputLabel value="Numéro des passeports : " for="listePasseport" />  
                                                    <p:dataList id="listePasseport" value="#{lesTravailleursBean.cvNationalitetravailleurSelectionner}" var="nationalite">  
                                                        <a><h:outputText value="#{nationalite.numeropasseport}"/></a> | <p:graphicImage value="./public/images/drapeau/#{nationalite.cvPays.codePays}.png" width="16" height="11"/> #{nationalite.cvPays.paysfr} <br /> 
                                                    </p:dataList>
                                                    <p:outputLabel value="Justificatif des passeports : " for="listeJustificatiPassepot" />  
                                                    <p:dataList id="listeJustificatiPassepot" value="#{lesTravailleursBean.cvNationalitetravailleurSelectionner}" var="nationalite">  
                                                        <h:commandLink value="#{nationalite.scanpasseport}" rendered="#{nationalite.scanpasseport != null}" /> <br /> 
                                                    </p:dataList>
                                                </h:panelGrid>
                                            </p:panel>
                                            <p:panel header="Permis de conduire" >
                                                <h:panelGrid columns="2">
                                                    <p:outputLabel value="N°numéro du permis :" for="permisNum"/>
                                                    <h:outputText value="#{lesTravailleursBean.cvPermisconduireSelectionner.numeropermis}" id="permisNum"/>
                                                    <p:outputLabel value="Type de permis:" for="typePermis"/>
                                                    <h:outputText value="#{lesTravailleursBean.cvPermisconduireSelectionner.typepermis}" id="typePermis"/>
                                                    <p:outputLabel value="Fin de valider:" for="validitePermis"/>
                                                    <h:outputText value="#{lesTravailleursBean.cvPermisconduireSelectionner.dateexpirationpermis}" id="validitePermis">
                                                        <f:convertDateTime pattern="dd/MM/yyyy" />
                                                    </h:outputText>
                                                    <p:outputLabel value="Justificatif du permis :" for="justificatifPermis"  />
                                                    <h:commandLink value="#" id="justificatifPermis" /> 
                                                </h:panelGrid>
                                            </p:panel>
                                        </h:panelGrid>  
                                    </h:panelGrid>
                                </p:tab>  
                                <p:tab title="Contrat et Affectation">  
                                    <h:panelGrid columns="2" cellpadding="10" >
                                        <p:panel header="Contrat">
                                            <h:panelGrid columns="2">  
                                                <p:outputLabel value="Compagnie :" for="compagnie"/>
                                                <h:outputText value="#{lesTravailleursBean.cvTravailleurSelectionner.cvTravail.idcompagnie.nomcompagnie}" id="compagnie"/>

                                                <p:outputLabel value="Type de contrat :" for="type"/>
                                                <h:outputText value="#{lesTravailleursBean.cvTravailleurSelectionner.cvTravail.typecontrat.typecontrat}" id="type"/>

                                                <p:outputLabel value="Date de debut :" for="datedebut"/>
                                                <h:outputText id="datedebut" value="#{lesTravailleursBean.cvTravailleurSelectionner.cvTravail.debutcontrat}" >
                                                    <f:convertDateTime pattern="dd/MM/yyyy" />
                                                </h:outputText>

                                                <p:outputLabel value="Date de fin :" for="datefin"/>
                                                <h:outputText id="datefin" value="#{lesTravailleursBean.cvTravailleurSelectionner.cvTravail.fincontrat}" >
                                                    <f:convertDateTime pattern="dd/MM/yyyy" />
                                                </h:outputText>
                                                <p:outputLabel value="Statue :" for="statut"/>
                                                <h:outputText value="#{lesTravailleursBean.statuEmpleye}" id="statut" />
                                            </h:panelGrid> 
                                        </p:panel>
                                        <p:panel header="Affectation">
                                            <h:panelGrid columns="2">
                                                <p:outputLabel value="Poste :" for="posteAffectation"/>
                                                <h:outputText value="#{lesTravailleursBean.cvPosteoccupeSelectionner.cvListeposteIdposte.poste}" id="posteAffectation"/>
                                                <p:outputLabel value="Equipe :" for="equipeAffectation"/>
                                                <h:outputText value="#{lesTravailleursBean.cvAffectationSelectionner.cvEquipedepartementIdequipedepartement.equipe}" id="equipeAffectation"/>
                                                <p:outputLabel value="Département :" for="departementAffectation"/>
                                                <h:outputText value="#{lesTravailleursBean.cvAffectationSelectionner.cvEquipedepartementIdequipedepartement.iddepartement.nomdepartement}" id="departementAffectation"/>
                                                <p:outputLabel value="Mission :" for="missionAffectation"/>
                                                <h:outputText value="#{lesTravailleursBean.cvAffectationSelectionner.cvEquipedepartementIdequipedepartement.iddepartement.idmission.idmission}" id="missionAffectation"/>
                                            </h:panelGrid>
                                        </p:panel> 
                                    </h:panelGrid>  

                                </p:tab>  
                                <p:tab title="Aptitude médicale">  
                                    <h:panelGrid columns="2" cellpadding="10" rendered="false">  
                                        <p:graphicImage value="/images/godfather/godfather3.jpg" />  
                                        <h:outputText value="After a break of more than 15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family.   
                                                      Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate." />  
                                    </h:panelGrid>  
                                </p:tab>  
                                <p:tab title="Aptitude professionnelle">  
                                    <h:panelGrid columns="2" cellpadding="10" rendered="false">  
                                        <p:graphicImage value="/images/godfather/godfather3.jpg" />  
                                        <h:outputText value="After a break of more than 15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family.   
                                                      Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate." />  
                                    </h:panelGrid>  
                                </p:tab>  
                                <p:tab title="Formations">  
                                    <h:panelGrid columns="2" cellpadding="10" rendered="false">  
                                        <p:graphicImage value="/images/godfather/godfather3.jpg" />  
                                        <h:outputText value="After a break of more than 15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family.   
                                                      Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate." />  
                                    </h:panelGrid>  
                                </p:tab>  
                                <p:tab title="Comportements">  
                                    <h:panelGrid columns="2" cellpadding="10" rendered="false">  
                                        <p:graphicImage value="/images/godfather/godfather3.jpg" />  
                                        <h:outputText value="After a break of more than 15 years, director Francis Ford Coppola and writer Mario Puzo returned to the well for this third and final story of the fictional Corleone crime family.   
                                                      Two decades have passed, and crime kingpin Michael Corleone, now divorced from his wife Kay has nearly succeeded in keeping his promise that his family would one day be completely legitimate." />  
                                    </h:panelGrid>  
                                </p:tab>  
                            </p:accordionPanel>
                        </p:panel>
                    </h:form>
                </ui:define>
            </ui:composition>
        </h:body>

    </f:view>
</html>

